-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[release/10.0] check ImmedValNeedsReloc in genCreateAddrMode #119757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/10.0] check ImmedValNeedsReloc in genCreateAddrMode #119757
Conversation
Co-authored-by: Copilot <[email protected]>
|
PTAL @jakobbotsch backport to 10.0 |
|
Do we need a regression test for this? |
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
I was not able to extract a reasonably small repro case out of ZstdSharp (without pinokes/3P), it also seems to be Release only, doesn't repro on Checked. The JIT fix seems to be harmless - it just disables a constant folding for non-relocatable handle + some other const. I suspect it's not the last instance of that problem and we need to refactor the JIT quite a bit, e.g. introduce a special node for constant handles and not re-use general GT_CNS_INT |
|
PTAL @AndyAyersMS @dotnet/jit-contrib (since Jakob is OOF) |
Backport of #119682 to release/10.0
/cc @EgorBo
Customer Impact
On NativeAOT (and R2R) certain code patterns could produce non-relocatable addresses leading to crashes. The repro involved an RVA + Unsafe.AsPointer pattern.
Regression
Looks like the incorrect logic was introduced many releases ago (in a commit from 2022 it was still there).
Testing
Customer's scenario is tested locally
Risk
Low